<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui" xmlns:hf="http://java.sun.com/jsf/composite/tags" 
	xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:cc="http://java.sun.com/jsf/composite">

	<cc:interface>
		<cc:attribute name="backingBean" required="true" />
		<cc:attribute name="formId" default="formId" />
		<cc:attribute name="columns" default="2" />
		<cc:attribute name="showFormButtons" default="true" />
		<cc:attribute name="formButtonsColumns" default="3" />
		<cc:attribute name="ajaxSubmit" default="false" />
	</cc:interface>
	
	<cc:implementation>
	
		<h:form id="#{cc.attrs.formId}">
			<p:messages id="messages" />
			<h:panelGrid columns="#{cc.attrs.columns}" columnClasses="#{cc.attrs.columnClasses}">
				<cc:insertChildren />
			</h:panelGrid>
			<h:panelGrid>
				<hf:formButtons rendered="#{cc.attrs.showFormButtons}" backingBean="#{cc.attrs.backingBean}" columns="#{cc.attrs.formButtonsColumns}" ajaxSubmit="#{cc.attrs.ajaxSubmi}" />
			</h:panelGrid>
		</h:form>

	</cc:implementation>
	
</html>
